<!DOCTYPE html>
<html>
<head>
    <title>图片管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <i-col span="4">
                <i-select v-model="q.isShow" placeholder="类型">
                    <i-option :value="0">全部</i-option>
                    <i-option :value="0">显示</i-option>
                    <i-option :value="1">禁止</i-option>
                </i-select>
            </i-col>
            <i-button @click="query">查询</i-button>
            #if($shiro.hasPermission("resource:update"))
            <i-button type="warning" @click="isShow"><i class="fa fa-pencil-square-o"></i>&nbsp;释放</i-button>
            #end
            #if($shiro.hasPermission("resource:delete"))
            <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;禁止</i-button>
            #end
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="apiResource" :rules="ruleValidate" :label-width="80">
            <Form-item label="id" prop="mouldId">
                <i-input v-model="apiResource.mouldId" placeholder="id"/>
            </Form-item>
            <Form-item label="备注" prop="mouldName">
                <i-input v-model="apiResource.mouldName" placeholder="备注"/>
            </Form-item>
            <Form-item label="图片" prop="url">
                <i-input v-model="apiResource.url" placeholder="图片"/>
            </Form-item>
            <Form-item label="缩略图" prop="thumbnail">
                <i-input v-model="apiResource.thumbnail" placeholder="缩略图"/>
            </Form-item>
            <Form-item label="描述" prop="imgDesc">
                <i-input v-model="apiResource.imgDesc" placeholder="描述"/>
            </Form-item>
            <Form-item label="排序" prop="sortOrder">
                <i-input v-model="apiResource.sortOrder" placeholder="排序"/>
            </Form-item>
            <Form-item label="是否显示 0 显示 1不显示" prop="isShow">
                <i-input v-model="apiResource.isShow" placeholder="是否显示 0 显示 1不显示"/>
            </Form-item>
            <Form-item label="类型 1图片 2 视频 3 音频" prop="type">
                <i-input v-model="apiResource.type" placeholder="类型 1图片 2 视频 3 音频"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/res/resource.js?_${date.systemTime}"></script>
</body>
</html>